﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Erp
{
    public partial class View_验货窗口 : UserControl
    {
        public View_验货窗口()
        {
            InitializeComponent();
        }

        private void btn0_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                return;
            else
                btn打印数量.Text += "0";
        }
        private void btn1_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "1";
            else
                btn打印数量.Text += "1";
        }

        private void btn2_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "2";
            else
                btn打印数量.Text += "2";
        }

        private void btn3_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "3";
            else
                btn打印数量.Text += "3";
        }

        private void btn4_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "4";
            else
                btn打印数量.Text += "4";
        }

        private void btn5_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "5";
            else
                btn打印数量.Text += "5";
        }

        private void btn6_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "6";
            else
                btn打印数量.Text += "6";
        }

        private void btn7_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "7";
            else
                btn打印数量.Text += "7";
        }

        private void btn8_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "8";
            else
                btn打印数量.Text += "8";
        }

        private void btn9_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text == "0")
                btn打印数量.Text = "9";
            else
                btn打印数量.Text += "9";
        }

        private void btn打印数量_Click(object sender, EventArgs e)
        {
            小键盘事件相应();
        }

        private void btn删除_Click(object sender, EventArgs e)
        {
            if (btn打印数量.Text.Length == 1)
                btn打印数量.Text = "0";
            else
                btn打印数量.Text = btn打印数量.Text.Substring(0, btn打印数量.Text.Length - 1);
        }

        private void 小键盘事件相应()
        {
            if (pnl数字.Visible)
            {
                pnl数字.Visible = false;               
                btn数字键盘.Symbol = 558830;
            }
            else
            {
                pnl数字.Visible = true;
                pnl数字.BringToFront();
                btn数字键盘.Symbol = 558831;
            }
        }

        private void btn数字键盘_Click(object sender, EventArgs e)
        {
            小键盘事件相应();
        }
    }
}
